package com.cljz.makepassenger.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;

import com.cljz.makepassenger.R;

import de.hdodenhof.circleimageview.CircleImageView;


public class LetterDialogView extends Dialog implements View.OnClickListener{

    private Context context;
    private YesDialogListener listener;
    private CircleImageView letterActionButton;

    public LetterDialogView(Context context) {
        super(context);
    }

    public LetterDialogView(Context context, int theme, YesDialogListener listener) {
        super(context,theme);
        this.context = context;
        this.listener = listener;
    }

    @Override
    public void onClick(View v) {
        listener.onClick(v);
    }

    public interface YesDialogListener {
        public void onClick(View v);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.dialog_letter_view);
        getWindow().setBackgroundDrawableResource(R.color.transparent);
        initView();
    }

    private void initView() {
        letterActionButton = (CircleImageView) findViewById(R.id.iv_close);
        letterActionButton.setOnClickListener(this);
    }
}
